﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using tomssoftware.Html;

namespace OutlookHub.Utils
{
    public static class HtmlConverter
    {
        public static string HtmlToAscii(this string htmlContent)
        {
            using (HtmlToText conv = new HtmlToText(htmlContent, false))
            {
                return conv.Body;
            }
            //string body = htmlContent;
            //body = body.Replace("<br/>", "\n");
            //body = Regex.Replace(body, @"<(.|\n)*?>", string.Empty);
            //body = body.Replace("&quot;", "\"").Replace("&lt;", "<").Replace("&gt;", ">").Replace("&nbsp;", "\n").Trim(' ', '\t', '\n', '\r');

            //return body;
        }
    }
}
